bitcoin-cli examples
code:logging
code:sendrawtransaction
bitcoin-cli sendrawtransaction "hex transaction"
Error: bad-txns-premature-spend-of-coinbase, tried to spend coinbase at depth 1
code:generatetodescriptor
❯ bitcoin-cli --regtest generatetodescriptor 101 "wpkh(tprv8ZgxMBicQKsPeEouTKKKxFXWfBzkPVnUphbBGZ1E2UHRjMZnG6LmwYDubJZeCLdHwcmx7znafY2Ub6RQUEw48UiEAYNWpooFQq6RU2FBtFX/84'/1'/0'/0/*)"
error code: -8
error message:
Ranged descriptor not accepted. Maybe pass through deriveaddresses first?
❯ bitcoin-cli --regtest generatetodescriptor 101 "wpkh(tprv8ZgxMBicQKsPeEouTKKKxFXWfBzkPVnUphbBGZ1E2UHRjMZnG6LmwYDubJZeCLdHwcmx7znafY2Ub6RQUEw48UiEAYNWpooFQq6RU2FBtFX/84'/1'/0'/0/0)"
code:createwallet
createwallet accepts a new passphrase parameter. If set, this will create the new wallet encrypted with the given passphrase. If unset (the default) or set to an empty string, no encryption will be used. (#16394) since v0.19.0.1
bitcoin-cli createwallet pool false false "" false true
code:importdescriptors
bitcoin-cli importdescriptors '"desc": "wpkh(tprv8ZgxMBicQKsPeEouTKKKxFXWfBzkPVnUphbBGZ1E2UHRjMZnG6LmwYDubJZeCLdHwcmx7znafY2Ub6RQUEw48UiEAYNWpooFQq6RU2FBtFX/84h/1h/0h/0/*)#7swry5a5", "timestamp":1455191478 }, { "desc": "wpkh(tprv8ZgxMBicQKsPeEouTKKKxFXWfBzkPVnUphbBGZ1E2UHRjMZnG6LmwYDubJZeCLdHwcmx7znafY2Ub6RQUEw48UiEAYNWpooFQq6RU2FBtFX/84h/1h/1h/0/*)#5te9s6mf", "timestamp":1455191478, "internal": true }'